package com.jonychen.swagger2demo.common.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

/**
 * @Description:用户登录表单参数
 * @Author: kui.chen@100credit.com
 * @Date: 2019/9/8 15:19
 */
@Data
@ApiModel(value = "LoginParam", description = "用户登录请求参数描述")
public class LoginParam {

    @ApiModelProperty(value = "用户名(4-50个字符)", required = true, position = 1)
    @NotEmpty(message = "用户名不能为空")
    @Length(min = 4, max = 50, message = "用户名不能超过50个字符")
    private String username;

    @ApiModelProperty(value = "密码(不小于6个字符)", required = true, position = 2)
    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, message = "密码不能小于6个字符")
    private String password;

    @ApiModelProperty(value = "是否自动登录", example = "false", position = 3)
    private Boolean isAutoLogin = false;

}